package com.sixth.controller.wx;


import com.sixth.bean.MarketCategory;
import com.sixth.bean.common.BaseRespVo;
import com.sixth.bean.vo.WXCatalogCurrentVO;
import com.sixth.bean.vo.WXCatalogIndexVO;
import com.sixth.service.WXCatalogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("wx/catalog")
public class WXCatalogController {

    @Autowired
    WXCatalogService catalogService;

    @RequestMapping("index")
    public BaseRespVo wxIndex() {

        WXCatalogIndexVO  catalogIndexVO = catalogService.wxIndex();


        return BaseRespVo.ok(catalogIndexVO);

    }


    @RequestMapping("current")
    public BaseRespVo wxCurrent(Integer id) {

        WXCatalogCurrentVO wxCatalogCurrentVO = catalogService.wxCurrent(id);

        return BaseRespVo.ok(wxCatalogCurrentVO);
    }

}
